import 'dart:ui';

import 'package:flutter/material.dart';

class UiBackdrop extends StatelessWidget {
  const UiBackdrop({
    super.key,
    required this.child,
    this.enable = true,
  });
  final Widget child;
  final bool enable;
  @override
  Widget build(BuildContext context) {
    return enable
        ? ClipRect(
            child: BackdropFilter(
            filter: ImageFilter.blur(
                sigmaX: 15.0, sigmaY: 15.0, tileMode: TileMode.repeated),
            child: child,
          ))
        : child;
  }
}
